package com.hsp.homework;


public class Homework03 {
    public static void main(String[] args) {
        Professor professor = new Professor("aa", 34, "professor", 12000,1.3);
        professor.introduce();
    }
}

class Teacher{

    private String name;
    private int age;
    private String post;
    private int salary;
    private double grade;

    public Teacher(String name, int age, String post, int salary,double grade) {
        this.name = name;
        this.age = age;
        this.post = post;
        this.salary = salary;
        this.grade = grade;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public int getAge() {
        return age;
    }

    public void setAge(int age) {
        this.age = age;
    }

    public String getPost() {
        return post;
    }

    public void setPost(String post) {
        this.post = post;
    }

    public int getSalary() {
        return salary;
    }

    public void setSalary(int salary) {
        this.salary = salary;
    }
    public void introduce(){
        System.out.println("姓名："+this.name+" 年龄："+this.age+" 职称："+this.post+" 基本工资："+this.salary*grade);
    }
}

class Professor extends Teacher{
    public Professor(String name, int age, String post, int salary,double grade) {
        super(name, age, post, salary,grade);
    }

    @Override
    public void introduce() {
        super.introduce();
//        System.out.println("姓名："+this.getName()+" 年龄："+this.getAge()+" 职称："+this.getPost()+" 基本工资："+this.getSalary()*1.3);
    }
}

class SubProfessor extends Teacher{
    public SubProfessor(String name, int age, String post, int salary,double grade) {
        super(name, age, post, salary,grade);
    }

    @Override
    public void introduce() {
        super.introduce();
//        System.out.println("姓名："+this.getName()+" 年龄："+this.getAge()+" 职称："+this.getPost()+" 基本工资："+this.getSalary()*1.2);

    }
}

class Assistant extends Teacher {
    public Assistant(String name, int age, String post, int salary,double grade) {
        super(name, age, post, salary,grade);
    }

    @Override
    public void introduce() {
        super.introduce();
//        System.out.println("姓名："+this.getName()+" 年龄："+this.getAge()+" 职称："+this.getPost()+" 基本工资："+this.getSalary()*1.3);;
    }
}

